package com.study.base.io.nio.bytebuffer;

/**
 * Description:
 * User: 27010
 * DateTime: 2017/10/1 22:12
 */
public class DirectBufferTest {
    public static void main(String[] args) throws InterruptedException {
        // for (int i = 0; i < 100; i++) {
        //  ByteBuffer buffer = ByteBuffer.allocateDirect(1024 * 1024 * 200);
        //  ((DirectBuffer) buffer).cleaner().clean();
        //  System.gc();
        //  }
//        WeakReference<Integer> weakReference = new WeakReference<Integer>(2476);
//        System.gc();
//        System.out.println(weakReference.get());

        Object o = new Object();
        Integer integer = new Integer(10);

        for(int i=0; i<5; i++){
            Test test = new Test();
            System.out.println(test);
        }




    }

    static class Test {
        @Override
        protected void finalize() throws Throwable {

        }
    }
}